<!DOCTYPE html>
<html lang="en" style="height: 100%;">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>MainFile</title>

    <!--[if lt IE 9]>
      <script src="javascript/html5.js"></script>
    <![endif]-->
    <link href="styles/jsdoc-default.css" rel="stylesheet">
    <link href="styles/prism.css" rel="stylesheet">
</head>

<body>

    <iframe id="content" style="width: calc(100% - 300px);height: calc(100% - 40px);border: 0px;border-style: none;overflow: hidden;position: relative;left: 300px;">
    </iframe>

    <div class="nav"></div>

    <script>
        if (window.frameElement) {
            document.body.className = 'embedded';

            var ele = document.createElement('a');
            ele.className = 'popout';
            ele.target = '_blank';
            ele.href = window.location.href;
            ele.title = 'Pop out';
            document.getElementById('main').appendChild(ele);
        }

        // Set targets on external links.  Sandcastle and GitHub shouldn't be embedded in any iframe.
        Array.prototype.forEach.call(document.getElementsByTagName('a'), function(a) {
            if (/^https?:/i.test(a.getAttribute('href'))) {
                a.target = '_blank';
            }
            a.data = a.href
            a.addEventListener('click',onAClick);
        });

        let _this=this;
        function onAClick(t) {
            document.getElementById('content').src =t.target.href;
        
            let fileName=t.target.href.substr(t.target.href.lastIndexOf('/'));
            _this.document.getElementsByTagName('title')[0].innerText=fileName.substr(1,fileName.length-6);
            t.preventDefault(); // 阻止默认事件，如链接跳转  
        }
    </script>

    <script src="javascript/prism.js"></script>
    <script src="javascript/bariumDoc.js"></script>

</body>

</html>